package com.salesystem.strust.action;

import javax.annotation.Resource;
import org.springframework.stereotype.Controller;

import com.opensymphony.xwork2.ActionSupport;
import com.salesystem.dao.entity.Tbluser;
import com.salesystem.dao.impl.UserLoginBiz;

@Controller
public class UserLoginAction extends ActionSupport{
	@Resource
	UserLoginBiz biz;
	private Tbluser user;
	public Tbluser getUser() {
		return user;
	}
	public void setUser(Tbluser user) {
		this.user = user;
	}
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public String userLogin(){
		return INPUT;
	}

	public String login(){
		
		boolean flag=biz.login(user);
		if(flag){
		return SUCCESS;	
		}else{
		return INPUT;
		}
	}

}
